const api = require('../../API/api.js');
Page({
  data: {
      sheetList:[],//歌单
  },
  getSheet(){
    api.getSheet({}).then(res=>{
      console.log(res.playlists);
      if(res.code ==200){
        this.setData({
          sheetList:res.playlists
        })
      }
    })
  },
  getsongList(e){
    console.log(e.currentTarget.dataset.id);
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: `../sheetList/sheetList?id=${id}`,
    })
  },
  onLoad(options) {
    this.getSheet(); //精选歌单
  },
  onReady() {

  },
  onShow() {

  },
  onHide() {

  },
  onUnload() {

  },
  onShareAppMessage() {
    return {
      title: '',
    };
  },
});